package com.chenbingkang.bigdata.homework2;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;

import java.io.IOException;
import java.net.InetSocketAddress;

public class Client {
    public static void main(String ... args){
        try {
            Calculate calculate= RPC.getProxy(Calculate.class,0,new InetSocketAddress("127.0.0.1",12345),new Configuration());
            int result=calculate.add(1,2);
            System.out.println(result);
            System.out.println(calculate.get("20210123456789"));
            System.out.println(calculate.get("20210123456783"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
